package com.cskaoyan.bean.vo.vxVo;

import com.cskaoyan.util.StringToArrayUtils;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class OrderDetailGoodsVO {
    /**
     * id : 638
     * orderId : 490
     * goodsId : 1110016
     * goodsName : 天然硅胶宠物除毛按摩刷1
     * goodsSn : 1110016
     * productId : 150
     * number : 2
     * price : 39
     * specifications : ["标准"]
     * picUrl : http://yanxuan.nosdn.127.net/3bd73b7279a83d1cbb50c0e45778e6d6.png
     * comment : 0
     * addTime : 2022-06-08 09:23:33
     * updateTime : 2022-06-08 09:23:33
     * deleted : false
     */

    private int id;
    private int orderId;
    private int goodsId;
    private String goodsName;
    private String goodsSn;
    private int productId;
    private int number;
    private int price;
    private String picUrl;
    private int comment;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    private Date updateTime;
    private Boolean deleted;
    private List<String> specifications;

    public void setSpecifications(String specifications) {
        this.specifications = StringToArrayUtils.toArray(specifications,String.class);
    }
}